<?php
namespace app\common\model\activity;


use app\common\model\BaseModel;
use app\common\model\store\coupon\StoreCoupon;
use app\common\model\store\coupon\StoreCouponIssueUser;
use app\common\model\store\coupon\StoreCouponUser;
use app\common\model\store\product\Product;
use app\common\model\system\merchant\Merchant;

class NewActivityCouponRelevance extends BaseModel
{

    /**
     * @return string
     * @author: fupeng
     * @day: 2024/1/28
     */
    public static function tablePk(): string
    {
        return 'new_activity_coupon_relevance_id';
    }

    /**
     * @return string
     * @author: fupeng
     * @day: 2024/1/28
     */
    public static function tableName(): string
    {
        return 'store_new_activity_coupon_relevance';
    }


    public function newActivity()
    {
        return $this->hasOne(NewActivity::class, 'new_activity_id', 'new_activity_id');
    }

    public function couponUser()
    {
        return $this->hasOne(StoreCouponUser::class, 'coupon_id', 'coupon_id');
    }


    public function coupon()
    {
        return $this->hasOne(StoreCoupon::class, 'coupon_id', 'coupon_id');
    }


}
